<?php
    #-------------------------------------------------------------#
	# This file is part of the Kumomado - Virtual Window Platform #
	# for PHP. (c) 2009 Tsai, Min Che <tirme0812@gmail.com>       #
	# Please visit http://www.kumomado.org/ for more information. #
	#                                                             #
	# This software is licensed under the GNU License v3. Please  #
	# view the LICENSE file for the full text of this license.    #
    #-------------------------------------------------------------#

	/**
	 * @package framework
	 * @subpackage exception
	 * @author Tsai, Min Che
	 */
	class KumomadoException extends Exception {
		public function __toArray($method = 'message|file|line') {
			$array = array();
			$method = explode('|', $method);
			if (in_array('message', $method)) {
				$array['message'] = $this->getMessage();
			}
			if (in_array('file', $method)) {
				$array['file'] = $this->getFile();
			}
			if (in_array('line', $method)) {
				$array['line'] = $this->getLine();
			}
			return $array;
		}
	}
?>